@echo off
echo ===== 启动FQ Game微服务 =====

echo 1. 启动中间件服务...
docker-compose up -d

echo 等待中间件服务启动完成...
timeout /t 30

echo 2. 编译项目...
call mvn clean package -DskipTests

echo 3. 启动认证服务...
start "认证服务" java -jar fqgame-auth/target/fqgame-auth.jar

echo 等待认证服务启动完成...
timeout /t 10

echo 4. 启动用户服务...
start "用户服务" java -jar fqgame-user/target/fqgame-user.jar

echo 等待用户服务启动完成...
timeout /t 10

echo 5. 启动网关服务...
start "网关服务" java -jar fqgame-gateway/target/fqgame-gateway.jar

echo ===== 所有服务已启动 =====
echo 网关地址: http://localhost:9000
echo Nacos控制台: http://localhost:8848/nacos
echo Zipkin控制台: http://localhost:9411
echo RabbitMQ控制台: http://localhost:15672

pause